<?php
/* @var $this PersonnelController */
/* @var $model Personnel */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'personnel-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'last_name'); ?>
		<?php echo $form->textField($model,'last_name',array('size'=>60,'maxlength'=>150)); ?>
		<?php echo $form->error($model,'last_name'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'first_name'); ?>
		<?php echo $form->textField($model,'first_name',array('size'=>60,'maxlength'=>150)); ?>
		<?php echo $form->error($model,'first_name'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'middle_initial'); ?>
		<?php echo $form->textField($model,'middle_initial',array('size'=>5,'maxlength'=>5)); ?>
		<?php echo $form->error($model,'middle_initial'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'birthdate'); ?>
		<?php $this->widget('zii.widgets.jui.CJuiDatePicker', array(
			'model'=>$model,
    		'attribute'=>'birthdate',
    		'name'=>'date5',
			'language'=>Yii::app()->language=='et' ? 'et' : null,
			'options'=>array(
				'changeMonth'=> true,
				'changeYear'=> true,
				'yearRange'=>'1960:2020',
				"dateFormat"=>'yy-mm-dd', // jquery plugin options
				'showAnim'=>'fold', // 'show' (the default), 'slideDown', 'fadeIn', 'fold'
				'showOn'=>'button', // 'focus', 'button', 'both'
      
				'buttonText'=>Yii::t('ui','Select form calendar'),
				'buttonImage'=>Yii::app()->request->baseUrl.'/images/calendar.png',
				'buttonImageOnly'=>true,
			),
			'htmlOptions'=>array(
			'style'=>'width:150px;vertical-align:top'
		)))?>
		<?php echo $form->error($model,'birthdate'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'contact_number'); ?>
		<?php echo $form->textField($model,'contact_number',array('size'=>45,'maxlength'=>45)); ?>
		<?php echo $form->error($model,'contact_number'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'date_hired'); ?>
		<?php $this->widget('zii.widgets.jui.CJuiDatePicker', array(
			'model'=>$model,
    		'attribute'=>'date_hired',
    		'name'=>'date6',
			'language'=>Yii::app()->language=='et' ? 'et' : null,
			'options'=>array(
				'changeMonth'=> true,
				'changeYear'=> true,
				'yearRange'=>'1960:2020',
				"dateFormat"=>'yy-mm-dd', // jquery plugin options
				'showAnim'=>'fold', // 'show' (the default), 'slideDown', 'fadeIn', 'fold'
				'showOn'=>'button', // 'focus', 'button', 'both'
      
				'buttonText'=>Yii::t('ui','Select form calendar'),
				'buttonImage'=>Yii::app()->request->baseUrl.'/images/calendar.png',
				'buttonImageOnly'=>true,
			),
			'htmlOptions'=>array(
			'style'=>'width:150px;vertical-align:top'
		)))?>
		<?php echo $form->error($model,'date_hired'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'job_title'); ?>
		<?php echo $form->textField($model,'job_title',array('size'=>60,'maxlength'=>150)); ?>
		<?php echo $form->error($model,'job_title'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'job_description'); ?>
		<?php echo $form->textField($model,'job_description',array('size'=>60,'maxlength'=>500)); ?>
		<?php echo $form->error($model,'job_description'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'schedule'); ?>
		<?php echo $form->textField($model,'schedule',array('size'=>60,'maxlength'=>500)); ?>
		<?php echo $form->error($model,'schedule'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'available'); ?>
		<?php echo $form->radioButtonList($model,'available', array(0 => 'No', 1 => 'Yes'), 
		array('separator' => ' ', 'labelOptions' => array('style' => 'display:inline'))); ?>
		<?php echo $form->error($model,'available'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->